export interface ResponseData {
  status: number
}

export type UserItem = {
  _id: string
  phone: string
  WaiFCode: string
  password?: string
  nick: string
  imgUrl: string
  sex: string
  age: number | string
  birthday: string
  start: string
  sign: string
  isStatus: boolean
}

export interface GetUsersResponseData extends ResponseData {
  data: {
    users: UserItem[]
    total: number
  }
}

export type UserFormType = Partial<UserItem>

export interface UploadResponseData extends ResponseData {
  message: '上传成功'
  data: {
    url: string
  }
}

export interface CreateOrUpdateUserData extends Partial<UserItem> {
  phone: string
  password: string
  nick: string
}

export interface CreateOrUpdateResponseData extends ResponseData {
  message: string
}

export type DeleteUserResponseData = CreateOrUpdateResponseData